package com.orm;

import java.util.List;

/**
 * Created by lirance on 16/4/6.
 */
public class GetServicesService extends Service{

    @Override
    public List<Entity> getAllEntities() {
        return getAllDao().getWebServiceDao().getAllWebService();

    }

    /*public Entity getEntitiesbyID(int id) {
        return getAllDao().getWebServiceDao().getWebServiceEntity(id);
    }*/
    public List<Entity> getEntitiesbyID(int id) {
        return getAllDao().getWebServiceDao().getWebServiceEntityById(id);
    }

    public List<Entity> getEntitiesbyName(String name) {
        return getAllDao().getWebServiceDao().getWebServiceEntityByName(name);
    }
    public List<Entity> getEntitiesbyClusteName(String name) {
        return getAllDao().getWebServiceDao().getWebServiceEntityByClusteName(name);
    }


    @Override


    public void insert(Entity entityRef) {
        getAllDao().getWebServiceDao().insert((WebServiceEntity) entityRef) ;

    }

    public void delete(Entity entity) {
        getAllDao().getWebServiceDao().delete((WebServiceEntity) entity);
    }

    public void update(Entity entity) {
        getAllDao().getWebServiceDao().update((WebServiceEntity) entity);
    }

    public void update_clusteNum(String clustNum, int wsId){getAllDao().getWebServiceDao().updateClustNume(clustNum, wsId);}
    public void update_clusteNam(String clustNam, int wsId){getAllDao().getWebServiceDao().updateClustName(clustNam, wsId);}
}
